package com.cmwa.scbp.sys.institution.entity;

import org.apache.commons.lang.StringUtils;
import org.apache.ibatis.type.Alias;

import com.cmwa.scbp.base.constants.Constant;
import com.cmwa.scbp.base.mvc.entity.BaseVo;
import com.cmwa.scbp.utils.cached.DictionaryCached;

@Alias("institutionVo")
public class InstitutionVo extends BaseVo {
	/**
     * 状态
	 */
    private String status; 
    
    private String statusName;
	    
    /**
     * 机构ID
	 */
    private String instId; 
	    
    /**
     * 机构简称
	 */
    private String instSName; 
	    
    /**
     * 机构全称
	 */
    private String instLName; 
	    
    /**
     * 机构类型
	 */
    private String instType; 
    
    private String instTypeNm; 
    
    private String instRolType;
    
    private String instRolTypeNm;
    
	    
    /**
     * 父级机构ID
	 */
    private String instParentId; 
    
    /**
     *  父级机构名称
     */
	private String instParentIdNm;    
  
    /**
     * 层级结构
	 */
    private String instLevel; 
    
	    
	/**
     * 状态
	 */
    public String getStatus () {
        return status;
    }
    public void setStatus (String status) {
        this.status = status;
    }
		
	/**
     * 机构ID
	 */
    public String getInstId () {
        return instId;
    }
    public void setInstId (String instId) {
        this.instId = instId;
    }
		
	/**
     * 机构简称
	 */
    public String getInstSName () {
        return instSName;
    }
    public void setInstSName (String instSName) {
        this.instSName = instSName;
    }
		
	/**
     * 机构全称
	 */
    public String getInstLName () {
        return instLName;
    }
    public void setInstLName (String instLName) {
        this.instLName = instLName;
    }
		
	/**
     * 机构类型
	 */
    public String getInstType () {
        return instType;
    }
    public void setInstType (String instType) {
        this.instType = instType;
    }
		
	/**
     * 父级机构ID
	 */
    public String getInstParentId () {
        return instParentId;
    }
    public void setInstParentId (String instParentId) {
        this.instParentId = instParentId;
    }
		
	/**
     * 层级结构
	 */
    public String getInstLevel () {
        return instLevel;
    }
    public void setInstLevel (String instLevel) {
        this.instLevel = instLevel;
    }
    
	public String getInstParentIdNm() {
		return instParentIdNm;
	}
	public void setInstParentIdNm(String instParentIdNm) {
		this.instParentIdNm = instParentIdNm;
	}
	public String getInstTypeNm() {
		if (StringUtils.isNotBlank(instType)) {
			return DictionaryCached.getDictName("IST_XXX_TYP", instType);
		}
		return instTypeNm;
	}
	public void setInstTypeNm(String instTypeNm) {
		this.instTypeNm = instTypeNm;
	}
	public String getInstRolType() {
		return instRolType;
	}
	public void setInstRolType(String instRolType) {
		this.instRolType = instRolType;
	}
	public String getInstRolTypeNm() {
		if (StringUtils.isNotBlank(instRolType)) {
			return DictionaryCached.getDictNameByArry("INST_ROL_TYPE", instRolType, ",");
		}
		return instRolTypeNm;
	}
	public void setInstRolTypeNm(String instRolTypeNm) {
		this.instRolTypeNm = instRolTypeNm;
	}
	public String getStatusName() {
		if (StringUtils.isNotBlank(status)) {
			if (StringUtils.equals(Constant.C_STATUS_C, status)) {
				return "已复核";
			}
		}
		return statusName;
	}
	public void setStatusName(String statusName) {
		this.statusName = statusName;
	}
	
}
